import  cv2
cp = cv2.VideoCapture("F:/桌面/t1.flv")
detector = cv2.CascadeClassifier("F:/temp/test.xml")
cp.set(3,60)
cp.set(4,50)
print(cp.get(3))
print(cp.get(4))
while True:
    flag,frame=cp.read()
    if(flag!=True):
        break

    rects =detector.detectMultiScale(frame,scaleFactor=1.1,maxSize=(100,100),minNeighbors=3,minSize=(20,20),flags=cv2.CASCADE_SCALE_IMAGE);
    for (x,y,w,h) in rects:
        cv2.rectangle(frame ,(x,y),(x+w,y+h),(0,255,0),2)
    cv2.imshow("frame",frame)
    cv2.waitKey(1)



